package com.lagou.rpc.consumer;

import com.lagou.rpc.api.IUserService;
import com.lagou.rpc.consumer.proxy.RpcClientProxy;
import com.lagou.rpc.pojo.User;

/**
 * @ClassName: ClientBootStrap
 * @Description:
 * @Author: qjc
 * @Date: 2021/9/21 11:39
 */
public class ClientBootStrap {
    // 用来直接测试调用服务端的
    // 先启动服务端，然后运行客户端进行调用
    public static void main(String[] args) {
        IUserService userService = (IUserService) RpcClientProxy.createProxy(IUserService.class);
        User user = userService.getById(1);
        System.out.println(user);
    }
}
